<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
    </head>
    <body>
        <button>AJAX</button>
        <script type="text/javascript">
            const btn = document.querySelector("button");

            btn.onclick = function(){
                fetch("http://127.0.0.1:8000/fetch-server?vip=1",{
                    method: "post",
                    headers: {
                        a: 100,
                        b: 200
                    },
                    body:"username=wt"
                }).then(response => {
                    return response.text();
                }).then(response => {
                    console.log(response);
                });

            }
        
        
        </script>
    </body>
</html>